﻿<phone:PhoneApplicationPage x:Class="MC.Phone.Ads.Example.MainPage"
                            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                            xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
                            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                            xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
                            xmlns:System="clr-namespace:System;assembly=mscorlib" mc:Ignorable="d" d:DesignWidth="480"
                            d:DesignHeight="768" FontFamily="{StaticResource PhoneFontFamilyNormal}"
                            FontSize="{StaticResource PhoneFontSizeNormal}" Foreground="{StaticResource PhoneForegroundBrush}"
                            SupportedOrientations="Portrait" Orientation="Portrait" shell:SystemTray.IsVisible="True">
        <!--LayoutRoot is the root grid where all page content is placed-->
  <Grid x:Name="LayoutRoot" Background="Transparent">
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto" />
      <RowDefinition Height="*" />
    </Grid.RowDefinitions>

    <!--TitlePanel contains the name of the application and page title-->
    <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
      <TextBlock x:Name="ApplicationTitle" Text="" Style="{StaticResource PhoneTextNormalStyle}" />
      <TextBlock x:Name="PageTitle" Text="WPUnifiedAd" Margin="9,-7,0,0"
                 Style="{StaticResource PhoneTextTitle1Style}" />
    </StackPanel>
    <StackPanel Grid.Row="1" VerticalAlignment="Bottom">
            <Button Content="Request new ad for AdBasic"
                    Click="Button_Click" />
            <Button Content="Next Page"
                    Click="NextButton_Click" />
      <!--
            <Ads:AdControl x:Name="AdBasic"
                           FallbackAdProviderName="AdDuplex"
                           IsTest="True"
                           AdEngaged="AdEngaged"
                           NewAd="NewAd"
                           NoAd="NoAd"
                           AdError="AdError">
                <Ads:AdControl.AdProviders>
                    <Provider:GenericAdProviderForXaml XamlUri="">
                        <Provider:GenericAdProviderForXaml.OfflineContent>
                            <Grid Width="480"
                                  Height="80"
                                  Background="{StaticResource PhoneBackgroundBrush}">
                                <Border BorderBrush="{StaticResource PhoneAccentBrush}"
                                        BorderThickness="1">
                                    <Grid>
                                        <TextBlock Text="WP Unified Ad"
                                                   Foreground="{StaticResource PhoneAccentBrush}"
                                                   Margin="0"
                                                   VerticalAlignment="Center"
                                                   HorizontalAlignment="Center"
                                                   FontSize="35" />
                                        <HyperlinkButton NavigateUri="http://wpunifiedad.codeplex.com"
                                                         HorizontalAlignment="Stretch"
                                                         VerticalAlignment="Stretch">
                                        </HyperlinkButton>
                                    </Grid>
                                </Border>
                            </Grid>
                        </Provider:GenericAdProviderForXaml.OfflineContent>
                    </Provider:GenericAdProviderForXaml>
                    ~1~<Provider:NoneAdProvider />@1@
                    <PubCenter:PubCenterAdProvider Application=""
                                                   AdUnit="" />
                    <AdDuplex:AdDuplexAdProvider App="" />
                    <MobFox:MobFoxAdProvider Publisher="test" />
                    <Smaato:SmaatoAdProvider AdSpace="0"
                                             Publisher="0" />
                    ~1~Experimental Support@1@
                    ~1~<AdMob:AdMobAdProvider AdUnit="" />@1@
                    ~1~<MillenialMedia:MillenialMediaAdProvider Apid="" />@1@
                    ~1~<InnerActive:InnerActiveAdProvider App="" />@1@
                </Ads:AdControl.AdProviders>
            </Ads:AdControl>
-->
      <!--<Ads:AdControl x:Name="AdWithLocalXml"
                           FallbackAdProviderName="Smaato"
                           IsTest="True">
                <Ads:AdControl.AdProviders>
                    <AdDuplex:AdDuplexAdProvider App="" />
                    ~1~<AdMob:AdMobAdProvider AdUnit="" />@1@
                    <Smaato:SmaatoAdProvider AdSpace="0"
                                             Publisher="0" />
                    <PubCenter:PubCenterAdProvider Application=""
                                                   AdUnit="" />
                    <MobFox:MobFoxAdProvider Publisher="test" />
                    <InnerActive:InnerActiveAdProvider App="" />
                </Ads:AdControl.AdProviders>
                <Ads:AdControl.AdProviderStrategy>
                    <Strategy:RemoteAdProviderStrategy xmlns:Strategy="clr-namespace:MC.Phone.Ads.Strategy;assembly=MC.Phone.Ads"
                                                       LocalProviderSettingsUri="MC.Phone.Ads.Example;component/Ads/AdSettings.xml" />
                </Ads:AdControl.AdProviderStrategy>
            </Ads:AdControl>-->
      <Ads:AdControl x:Name="Ad" IsTest="True" xmlns:Ads="clr-namespace:MC.Phone.Ads;assembly=MC.Phone.Ads"
                     xmlns:Provider="clr-namespace:MC.Phone.Ads.Provider;assembly=MC.Phone.Ads"
                     xmlns:PubCenter="clr-namespace:MC.Phone.Ads.PubCenter;assembly=MC.Phone.Ads.PubCenter"
                     xmlns:Smaato="clr-namespace:MC.Phone.Ads.Smaato;assembly=MC.Phone.Ads.Smaato"
                     xmlns:MobFox="clr-namespace:MC.Phone.Ads.MobFox;assembly=MC.Phone.Ads.MobFox"
                     xmlns:AdDuplex="clr-namespace:MC.Phone.Ads.AdDuplex;assembly=MC.Phone.Ads.AdDuplex"
                     xmlns:AdMob="clr-namespace:MC.Phone.Ads.AdMob;assembly=MC.Phone.Ads.AdMob"
                     xmlns:InnerActive="clr-namespace:MC.Phone.Ads.InnerActive;assembly=MC.Phone.Ads.InnerActive"
                     xmlns:MillennialMedia="clr-namespace:MC.Phone.Ads.MillennialMedia;assembly=MC.Phone.Ads.MillennialMedia"
                     AdEngaged="AdEngaged" NewAd="NewAd" NoAd="NoAd" AdError="AdError">
          <Provider:GenericAdProviderForXaml XamlUri="http://someurlinthewild.com/Ad.xaml?appid={0}">
            <Provider:GenericAdProviderForXaml.OfflineContent>
              <Grid Width="480" Height="80" Background="{StaticResource PhoneBackgroundBrush}">
                <Border BorderBrush="{StaticResource PhoneAccentBrush}" BorderThickness="1">
                  <Grid>
                    <TextBlock Text="WP Unified Ad" Foreground="{StaticResource PhoneAccentBrush}" Margin="0"
                               VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="35" />
                    <HyperlinkButton NavigateUri="http://wpunifiedad.codeplex.com"
                                     HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                    </HyperlinkButton>
                  </Grid>
                </Border>
              </Grid>
            </Provider:GenericAdProviderForXaml.OfflineContent>
          </Provider:GenericAdProviderForXaml>
          <Provider:NoneAdProvider />
          <PubCenter:PubCenterAdProvider Application="" AdUnit="" />
          <AdDuplex:AdDuplexAdProvider App="" />
          <MobFox:MobFoxAdProvider Publisher="test" />
          <Smaato:SmaatoAdProvider AdSpace="0" Publisher="0" />
          <!--<MillennialMedia:MillennialMediaAdProvider AdType="Bottom"  Apid="" />-->
          <!--Experimental Support-->
                <!--<AdMob:AdMobAdProvider AdUnit="" />-->
          <!--<InnerActive:InnerActiveAdProvider App="" IsTest="True" />-->
        <Ads:AdControl.AdProviderStrategy>
          <Strategy:RemoteAdProviderStrategy xmlns:Strategy="clr-namespace:MC.Phone.Ads.Strategy;assembly=MC.Phone.Ads"
                                             LocalProviderSettingsUri="Ads/AdSettings.xml" RemoteProviderSettingsUri="http://someurlinthewild.com/ads.xml"
                                             CacheConfigurationInMemory="True"
                                             FallbackAdProviderName="GenericAdProviderForXaml"
                                             WhenOffline="UseFallbackAdProvider" />
        </Ads:AdControl.AdProviderStrategy>
      </Ads:AdControl>
    </StackPanel>
    <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"></Grid>
  </Grid>
</phone:PhoneApplicationPage>